package com.turing.data.inner;

import com.turing.common.response.PageBean;
import com.turing.common.response.ResponseVO;
import com.turing.data.model.dto.produre.TaskRecordDto;
import com.turing.data.model.vo.produre.TaskRecordVo;
import com.turing.data.vo.in.review.FileSearchVO;
import com.turing.data.vo.out.review.DrawFileVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "draw", primary = false, path = "task")
public interface TaskRecordInnerService {

    /*
     * 完成审核
     * */
    @PostMapping("finishReview")
    String finishReview(@RequestParam("version") Integer version, @RequestParam("parentTaskSn") String taskSn);

    /**
     * 查找任务审核信息
     *
     * @param searchVO 查询参数
     * @return com.turing.common.response.PageBean<com.turing.reviewer.vo.out.review.FileListVO>
     * @author lcy
     * @date 2021/5/29 00:34
     **/
    @PostMapping("getDrawFileList")
    PageBean<DrawFileVO> getDrawFileList(@RequestBody FileSearchVO searchVO);

    @PostMapping("finishOCRTask")
    Integer finishOCRTask(@RequestParam("parentTaskSn") String taskSn);

    /**
     * 根据参数值查找任务信息
     *
     * @param taskRecordDto 参数对象
     * @return com.turing.common.response.ResponseVO<java.util.List < com.turing.procedure.model.domain.task.TaskRecord>>
     * @author lcy
     * @date 2021/6/16 16:41
     **/
    @PostMapping("getTaskRecord")
    ResponseVO<List<TaskRecordVo>> getTaskRecord(@RequestBody TaskRecordDto taskRecordDto);

    @PostMapping("deleteProductChildTask")
    void deleteProductChildTask(String childTaskSn);

    @GetMapping("getTaskName")
    String getTaskName(@RequestParam("parentTaskSn") String taskSn);

    /**
     * 根据任务id校验是否为产品场景
     *
     * @param taskSn 需要复制的任务id
     * @return boolean
     * @author lcy
     * @date 2021/6/16 15:33
     **/
    @PostMapping("checkProductById")
    ResponseVO<Boolean> checkProductByTaskSn(@RequestParam String taskSn);


}
